package com.dlwx.firefighting.adapter;

import android.content.Context;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.dlwx.firefighting.R;

/**
 * Created by Administrator on 2017/9/5.
 */

public class GridAdapter extends  ListBaseAdapter<String> {
    private Context context;
    public GridAdapter(Context context) {
        super(context);
        this.context=context;
    }

    @Override
    public int getLayoutId() {
        return R.layout.item_img;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        String url = getDataList().get(position);
        ImageView imageView=holder.getView(R.id.imageView);
        Glide.with(context).load(url).error(R.mipmap.error_small).into(imageView);
    }
}
